package com.qf.agro.controller;

import com.qf.agro.common.ResultInfo;
import com.qf.agro.service.DeviceStaticService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import java.security.PublicKey;

/**
 * @author 10202
 * @version V1.0
 * @Project smart-agriculture-parent
 * @Package com.qf.agro.controller
 * @Date 2023/7/5 20:51
 */
@RestController
@RequestMapping("device/static")
public class DeviceStaticController {
    @Autowired
    private DeviceStaticService staticService;

    @GetMapping("page")
    public ResultInfo getPage(@RequestParam(value = "page",defaultValue = "1")Integer pageNum,@RequestParam(defaultValue = "5")Integer pageSize,String name){


  return staticService.getPage(pageNum,pageSize,name);
    }
    @GetMapping("count")
    public ResultInfo getCount(){

       return staticService.getCount();
    }

}
